﻿/**
 * zebron
 * 点击设备列表 位置卧室下拉条 跳至的悬浮窗
 */

class PosiBedroomWindow extends UiFramework.Dialog
{
    onStart(divSelf: HTMLDivElement)
    {
        let rooms = new Array("卧室", "小厅"); // 动态数组

        // 列表 item 
        for (let i = 0; i < 2; i++)
        {
            // 条目 div
            let divItem = document.createElement("div");
            divItem.style.width = "100%";
            divItem.style.height = "66px";
            divItem.style.zIndex = "10010";
            divItem.style.backgroundColor = "#FFFFFF";
            divItem.style.borderBottom = '2px solid #95989A';
            this.divSelf.appendChild(divItem);

            // 条目名称前图标
            let imgItem = document.createElement("img");
            imgItem.src = "picture/ic_dialog.png";
            imgItem.style.paddingTop = "24px";
            imgItem.style.paddingLeft = "30px";
            divItem.appendChild(imgItem);

            // 条目名称
            let nameItem = document.createElement("nameItem");
            nameItem.style.paddingLeft = "20px";
            nameItem.textContent = rooms[i]; // 填充内容
            divItem.appendChild(nameItem);
        }
    }
}

DialogMap["posiBedroomWindow"] = () =>
{
    return new PosiBedroomWindow();
}